home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_plotutils.idb / usr / freeware / share / ode / henon.ode.z / henon.ode
Encoding:
Text File  |  1998-10-28  |  662 b   |  30 lines

  1. # You may run this example by doing:
  2. #
  3. #    ode < henon.ode | graph -T X -C
  4. # or alternatively, to get a real-time plot,
  5. #
  6. #    ode < henon.ode | graph -T X -C -x -0.6 0.6 -y -0.6 0.6
  7. #
  8.  
  9. # This example shows a simple center with complicated orbits:
  10. # the system investigated by Henon and Heiles.
  11. # The Poincare plot is a graph of p1(t) vs. q1(t).
  12.  
  13. # Initial condations:
  14. # stable:    p1 = 1/3, q1 = 1/4, p2 = 0.1293144, q2 = 1/5
  15. # unstable:  p1 = 0.1, q1 = 0.1, p2 = 0.467618,  q2 = 0.1
  16.  
  17. qone' = pone
  18. qtwo' = ptwo
  19. pone' = -qone - 2*qone*qtwo
  20. ptwo' = -qtwo - qone*qone + qtwo*qtwo
  21.  
  22. pone = 1/3
  23. qone = 1/4
  24. ptwo = 0.1293144
  25. qtwo = 1/5
  26.  
  27. print pone, qone
  28. step 0,250
  29.